<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <title>登录</title>

        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="js/jquery/jquery.mobile-1.4.5.min.css"/>

        <link rel="stylesheet" href="css/total/index.css" />
        <link rel="stylesheet" href="css/total/button.css" />
    </head>

    <body>
        <div data-role="page" id="login">
            <image src="img/头像.png" class="imghead" />
            <div data-role="ui-content">
                <div class="login-fromgroup">
                    <form action="function/login.php" method="post" id="login_form">
                        <div class="login-from-user">
                            <input type="text" name="username" placeholder="用户名" />
                        </div>
                        <div class="login-from-password">
                            <input type="password" name="passwd" placeholder="密码" />
                        </div>
                        <div class="login-btn-login">
                            <!--
                            <a href="#" class="btn">登录</a>
                            -->
                            <input type="submit" class="btn" value="登录" />
                        </div>
                    </form>
                </div>

                <a href="register.html" class="login-a-none" style="color:#655f5f;"><h5 class="login_register">没有账号？</h5></a>
                <a href="forgetpassword.html" class="login-a-forget" style="color:#655f5f;"><h5 class="login_forget">忘记密码？</h5></a>

            </div>
            <div data-role="none">
                <div class="login_threelogin">
                    <hr style="margin-top:10px;margin-left:10%;" color=grey width=25% size=1.5 align=left noshade >
                    <h5 class="login_three">第三方登录</h5>
                    <hr style="margin-top:-32px;margin-left:65%;" color=grey width=25% size=1.5 align=left noshade >
                </div>

                <div>
                    <a href="#" class="login-img-one">
                        <image src="img/QQ.PNG"/>
                    </a>
                    <a href="#" class="login-img-two">
                        <image src="img/weixin.png"/>
                    </a>
                    <a href="#" class="login-img-three">
                        <image src="img/weibo.png"/>
                    </a>
                </div>
            </div>
        </div>

        <script src="js/jquery/jquery-1.12.0.min.js"></script>
        <script src="js/jquery/jquery.mobile-1.4.5.min.js"></script>
        <script src="js/jquery.form.js"></script>
        <script>
            $(function () {
                $("#login_form").ajaxForm(function (data) {
                    var obj = eval("(" + data + ")");
//                    var obj=jQuery.parseJSON(data);
                    if (obj.status != "ok") {
                        alert(obj.message);
                    } else {
                        // 转入新的url
                        window.location.href = obj.data;
                    }
                });
            });
        </script>
    </body>
</html>